package com.nami.ucenter.application.convertor;

import com.nami.ucenter.domain.model.UserLoginModel;
import com.nami.ucenter.facade.login.request.command.UserLoginCmd;

public class UserLoginCmdToModelAssembler {

//    public static UserLoginModel toModel(UserLoginCmd command, UserModel userInfo) {
//        UserLoginModel model = new UserLoginModel();
//        model.setUserId(command.getUserId());
//        model.setAppKey(command.getAppKey());
//
//        model.setMqTags(command.getMqTags());
//        model.setDeviceType(command.getDeviceType());
//
//        model.setClientIp(command.getClientIp());
//        model.setNick(userInfo.getNickname());
//        model.setAvatar(userInfo.getAvatarUrl());
//        model.setStatus(userInfo.getStatus());
//
//        return model;
//    }

    public static UserLoginModel toModel(UserLoginCmd command) {
        UserLoginModel model = new UserLoginModel();
        model.setUserId(command.getUserId());
        model.setAppKey(command.getAppKey());

        model.setInstanceId(command.getInstanceId());
        model.setConnectId(command.getConnectId());
        model.setPlatform(command.getPlatform());

        model.setClientIp(command.getClientIp());
        model.setTempFingerprint(command.getTempFingerprint());
//        model.setNick(userInfo.getNickname());
//        model.setAvatar(userInfo.getAvatarUrl());
//        model.setStatus(userInfo.getStatus());

        return model;
    }

}
